var blogDao = require('../../dao/blog.js');
module.exports = function(app) {
	app.get('/api/blog/getBlogs', function(req, res) {
		var index = req.query.index;
		blogDao.findBlogs(index, function(isSuccess, err, blogs, count, pageSise) {
			res.json({
				status: isSuccess,
				err: err,
				blogs: blogs,
				count: count,
				pageSise: pageSise
			})
		})
	});
};